﻿using System;
using DapperExtensions.Mapper;

namespace ZilLion.Service.WeChatMall.Domain.Entitys.GsInfo
{
    public class GsGroupRelationShipEntity
    {
        /// <summary>
        ///     分组id
        /// </summary>
        public long GroupId { get; set; }

        /// <summary>
        ///     货品id
        /// </summary>
        public long GsId { get; set; }

        /// <summary>
        ///     货品顺序码(从0开始，必须连续)
        /// </summary>
        public int GsSn { get; set; }

        /// <summary>
        ///     修改时间
        /// </summary>
        public DateTime UpdatedTime { get; set; }

        /// <summary>
        ///     修改人
        /// </summary>
        public long Updater { get; set; }
    }

    public class GsGroupRelationShipEntityMapper : ClassMapper<GsGroupRelationShipEntity>
    {
        public GsGroupRelationShipEntityMapper()
        {
            Table("groupgsrelationship");
            Map(f => f.GroupId).Column("groupid").Key(KeyType.Assigned);
            Map(f => f.GsId).Column("gsid").Key(KeyType.Assigned);
            Map(f => f.GsSn).Column("gssn");
            Map(f => f.UpdatedTime).Column("updatedtime");
            Map(f => f.Updater).Column("updater");
        }
    }
}